package org.yxt.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.yxt.springcloud.entity.CommonResult;

import java.math.BigDecimal;

/**
 * 微服务接口
 */
@FeignClient(value = "cloud-alibaba-seate-account-service")
public interface AccountService {

    /**
     * 扣减账户余额
     *
     * @param userId
     * @param money
     * @return
     */
    @PostMapping(value = "/account/decrease")
    CommonResult decrease(@RequestParam("userId") long userId, @RequestParam("money") BigDecimal money);
}
